<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;
/*
管理员操作页面
 */
//管理员登录页面
Route::rule('admin/login','admin/Login/index','GET');
Route::rule('admin/check','admin/Login/check','POST');
//管理员主页
Route::rule('admin/home','admin/Home/index','GET');
//管理员退出登录
Route::rule('admin/logout','admin/Home/logout','GET');
//管理员登录日志
Route::rule('admin/logs','admin/admin.Logs/index','GET');
//管理员修改密码
Route::rule('admin/pwd','admin/admin.Pwd/index','GET');
Route::rule('admin/pwd/save','admin/admin.Pwd/save','POST');
/*
商品管理
 */
//商品添加
Route::rule('admin/goods/goodsadd','admin/admin.goods.GoodsAdd/index','GET');
Route::rule('admin/goods/goodsadd/save','admin/admin.goods.GoodsAdd/save','POST');
//html编辑器上传图片
Route::rule('admin/goods/goodsadd/uploadimg','admin/admin.goods.GoodsAdd/uploadImg','POST');
//商品编辑模式下商品详情图的删除
Route::rule('admin/goods/goodsadd/imagedel','admin/admin.goods.GoodsAdd/imageDel','GET');
//商品列表
Route::rule('admin/goods/goodslist','admin/admin.goods.GoodsList/index','GET');
//在商品列表下对商品的删除
Route::rule('admin/goods/goodsdel','admin/admin.goods.GoodsList/goodsDel','GET');

//测试页面
Route::rule('test','index/Test/test','GET');

/*
用户访问首页
 */
//跳转提示页面
Route::rule('prompt','index/Prompt/index','GET');
//首页
Route::rule('/','index/Index/index','GET');
//商品分类别显示
Route::rule('productClass','index/product.ProductClass/index','GET');
//商品详情页
Route::rule('productDetails','index/product.ProductDetails/index','GET');

/*
注册登录页面
 */
//注册页面
Route::rule('register','index/Register/index','GET');
Route::rule('register/save','index/Register/save','POST');
Route::rule('register/check','index/Register/check','POST');
Route::rule('register/send','index/Register/send','POST');
Route::rule('register/checkcode','index/Register/checkcode','POST');
//登录页面
Route::rule('login','index/Login/index','GET');
Route::rule('login/check','index/Login/check','POST');

/*
用户中心
 */
//个人资料
Route::rule('user/info','index/user.Info/index','GET');
Route::rule('user/info/save','index/user.Info/save','POST');
//退出登录
Route::rule('user/info/logout','index/user.Info/logout','GET');
//修改头像
Route::rule('user/head','index/user.Head/index','GET');
Route::rule('user/head/save','index/user.Head/save','POST');
//修改密码
Route::rule('user/pwd','index/user.Pwd/index','GET');
Route::rule('user/pwd/save','index/user.Pwd/save','POST');
//日志管理
Route::rule('user/logs','index/user.Logs/index','GET');
//地址管理
Route::rule('user/addressControl','index/user.AddressControl/index','GET');
//添加地址
Route::rule('user/addressAdd','index/user.AddressAdd/index','GET');
Route::rule('user/addressAdd/save','index/user.AddressAdd/save','POST');
Route::rule('user/addressAdd/addressdel','index/user.AddressAdd/addressDel','GET');



return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
